/*
 * ClientWebService.java
 * 
 * Created: Feb 16, 2015
 * 
 * Copyright (c) ExpertPB 2014
 * All information contained herein is, and remains the property of
 * ExpertPB and its suppliers, if any.
 */
package com.emex.app.shared.ws;

import com.emex.app.shared.data.Client;
import com.emex.app.shared.data.JuridicalPerson;
import java.util.List;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;

/**
 *
 * @author Sergey Karavaev
 */
@WebService(targetNamespace = "http://emex.com/Client")
public interface ClientWebService {

    @WebMethod
    @RequestWrapper(className = "deleteClient")
    @ResponseWrapper(className = "deleteClientResponse")
    public int deleteByPrimaryKey(Integer id);

    @WebMethod
    @RequestWrapper(className = "insertClient")
    @ResponseWrapper(className = "insertClientResponse")
    public Client insert(Client record);

    @WebMethod
    public List<Client> selectByPhoneOrSurname(String criteria);

    @WebMethod
    @RequestWrapper(className = "selectClientByPrimaryKey")
    @ResponseWrapper(className = "selectClientByPrimaryKeyResponse")
    public Client selectByPrimaryKey(Integer id);

    @WebMethod
    @RequestWrapper(className = "updateClientByPrimaryKey")
    @ResponseWrapper(className = "updateClientByPrimaryKeyResponse")
    public Client updateByPrimaryKey(Client record);

    @WebMethod
    public List<Client> getAllClients();
    
    @WebMethod
    public List<Client> getAllClientsByOrderPositionName(String name);
    
    @WebMethod
    public List<JuridicalPerson> getAllJuridicalClientsByOrderPositionName(String name);
}
